OUTPUT TO c:\qadguicli\bom_pscode.txt. 
FOR EACH ps_mstr WHERE ps_comp BEGINS "P" AND ps_ps_code <> "A" BREAK BY ps_par :

    IF LAST-OF(ps_par) THEN DO:
       FIND FIRST sct_det WHERE sct_part = ps_par AND sct_site = "500" AND sct_sim = "standard" NO-ERROR.

       DISP ps_par ps_comp ps_ps_code 
            sct_lbr_ll WHEN AVAILABLE(sct_det)
            sct_lbr_tl WHEN AVAILABLE(sct_det)
           WITH STREAM-IO WIDTH 150. 

    END.
END.
